BTLIDER
guest
🔔 0
₴ 0

Завантаження…

Запуск офлайн-версії
Logs

and HTML breaks inside injected script return JSON.stringify(obj) .replace(//g,'--\\u003e') .replace(/\u2028/g,'\\u2028') .replace(/\u2029/g,'\\u2029'); } function getAuthSnapshot(){ const authed = isAuthed(); const player = getPlayer(); const gc = safeJSONParse(localStorage.getItem('gorilla_current'), null); const gorAuth = localStorage.getItem(LS_GOR_AUTH); return { authed, player, gorilla_current: gc, gorAuth }; } function buildFrameBootstrapJS(snap){ const snapLit = safeInlineJSON(snap); // Runs BEFORE app scripts in the embedded page return ( "(function(){try{" + "var SNAP="+snapLit+";" + "var A=!!SNAP.authed;" + "try{localStorage.setItem('BTLIDER_AUTH',A?'1':'0');}catch(e){}" + "try{localStorage.setItem('BTLIDER_PLAYER_V1',JSON.stringify(SNAP.player||{}));}catch(e){}" + "try{if(SNAP.gorilla_current){localStorage.setItem('gorilla_current',JSON.stringify(SNAP.gorilla_current));}}catch(e){}" + "try{if(SNAP.gorAuth!=null){localStorage.setItem('GORILLA_DEMO_AUTH',String(SNAP.gorAuth));}}catch(e){}" + "try{document.documentElement.dataset.btliderAuthed=A?'1':'0';}catch(e){}" + // Hide login/register CTA if authed (text + href + data-href) "function hideAuthCTA(){" + "if(!A) return;" + "var nodes=document.querySelectorAll('a,button,[role=button],input[type=button],input[type=submit]');" + "for(var i=0;i-1 || t.indexOf('вхід')>-1 || t.indexOf('реєстра')>-1 || t.indexOf('login')>-1 || t.indexOf('register')>-1 || t.indexOf('sign')>-1 || h.indexOf('login')>-1 || h.indexOf('register')>-1 || h.indexOf('signup')>-1){" + "try{el.style.display='none';}catch(e){}" + "}" + "}" + "}" + "hideAuthCTA();" + "try{new MutationObserver(function(){hideAuthCTA();}).observe(document.documentElement,{subtree:true,childList:true});}catch(e){}" + "}catch(e){}})();" ); } function injectBootstrapIntoHTML(html, kind){ // Only pages that must reflect auth state if(!(kind==='AUTH' || kind==='VV15')) return html; const snap = getAuthSnapshot(); const js = buildFrameBootstrapJS(snap); const tag = '